function varargout = predict_return(tool,...
    mat_X,mat_Y,hiddenLayerSize)

switch tool
    case 'NN'
        net = fitnet(hiddenLayerSize);
        net.divideParam.trainRatio = 70/100;
        net.divideParam.valRatio = 15/100;
        net.divideParam.testRatio = 15/100;
        
        [net,tr] = train(net,mat_X',mat_Y');
        varargout{1} = net;
        
        %         errors = gsubtract(targets,outputs);
        %         performance = perform(net,targets,outputs);
    case 'step'
        [coeff,~,~,inmodel] = stepwisefit(mat_X,mat_Y);
        coeff = coeff';
        
        varargout{1} = coeff;
        varargout{2} = inmodel;

end
end